<?php
define('MVC_ROOT_DIR',realpath(dirname(__FILE__)));
define('MVC_DEBUG',2047);
define('MVC_WEB_DIR', strtolower(preg_replace('/[\w]+.php/','',strtolower($_SERVER['SCRIPT_NAME']))));
define('MVC_LOG_DIR',MVC_ROOT_DIR.DIRECTORY_SEPARATOR.'log'.DIRECTORY_SEPARATOR);
define('MVC_CACHE_DIR',MVC_ROOT_DIR.DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR);
define('MVC_WWW_HOST','http://'.$_SERVER['HTTP_HOST'].MVC_WEB_DIR);	
define('MVC_USER_IMG', MVC_WWW_HOST.'upload/images/users/');
define('MVC_UPLOAD_DIR',MVC_WEB_DIR.'upload/');
define('MVC_PRE_PAGE',@$_SERVER['HTTP_REFERER']) ;
define('MVC_THIS_PAGE', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
define('MVC_LIB_DIR', 'sys_lib'.DIRECTORY_SEPARATOR);
define('MVC_WEB_PATH', MVC_ROOT_DIR.DIRECTORY_SEPARATOR);
define('MVC_WEB_NAME', '');
define('MVC_WWW_NAME','');
error_reporting(MVC_DEBUG);
require MVC_ROOT_DIR.DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.MVC_LIB_DIR.'Run.php';